package servers

import (
	"go-ddd/config"
	"go-ddd/internal/supplier"
	"net/http"
	//  mysql driver
	_ "github.com/jinzhu/gorm/dialects/mysql"
)

type Repos struct {
	SupplierRepo supplier.SupplierRepo
}

func NewRepos(cfg *config.ConvertConfig) *Repos {
	// 持久化类型的 repo
	//db := NewDB(cfg)
	//userRepo := user.NewMysqlUserRepo(db)

	supplierRepo := supplier.NewHttpSupplierRepo(&http.Client{})
	return &Repos{
		//	UserRepo: userRepo,
		SupplierRepo: supplierRepo,
	}
}
